package com.learner.pojo.user.vo;

import lombok.Data;

import java.util.Date;

/**
 * @author ice2020x
 * @Date: 2023/2/28
 * @Description:
 **/
@Data
public class MessageListVo implements Comparable<MessageListVo> {
    private String id;
    private String avatar;
    private String username;
    private String nickname;
    private String friendBeiZu;
    /**
     * 最后一条消息
     **/
    private String lastMessage;

    private String  messageType;
    /**
     * 最后一条消息的时间
     **/
    private Date time;

    @Override
    public int compareTo(MessageListVo o) {
        long l = this.time.getTime() - o.time.getTime();
        return Math.toIntExact(l);
    }
}
